home *** CD-ROM | disk | FTP | other *** search
- function onReplyData(success)
- {
- trace("adtat Valasz XML:" + replyDataServer.toString());
- switch(replyDataServer.status)
- {
- case 0:
- msg = "No error; parse was completed successfully.";
- break;
- case -2:
- msg = "A CDATA section was not properly terminated.";
- break;
- case -3:
- msg = "The XML declaration was not properly terminated.";
- break;
- case -4:
- msg = "The DOCTYPE declaration was not properly terminated.";
- break;
- case -5:
- msg = "A comment was not properly terminated.";
- break;
- case -6:
- msg = "An XML element was malformed.";
- break;
- case -7:
- msg = "Out of memory.";
- break;
- case -8:
- msg = "An attribute value was not properly terminated.";
- break;
- case -9:
- msg = "A start-tag was not matched with an end-tag.";
- break;
- case -10:
- msg = "An end-tag was encountered without a matching start-tag";
- }
- replyRoot = replyDataServer.firstChild;
- if(success)
- {
- trace(replyRoot.lastChild.attributes.result);
- }
- else
- {
- trace("------hiba az XML betoltesenel!");
- }
- hideWindow();
- _root.gotoToplist();
- }
- function sendDataToServer(clientid, password)
- {
- sendData = new XML();
- sendData.xmlDecl = " <?xml version=\'1.0\' encoding=\'UTF-8\' ?>";
- sendDataElement = sendData.createElement("ask");
- sendData.appendChild(sendDataElement);
- dataElement = sendData.createElement("data");
- dataElement.attributes.action = "add_score";
- dataElement.attributes.xmas2004_sid = _root.sid;
- dataElement.attributes.name = name.text;
- dataElement.attributes.email = email1.text + "@" + email2.text;
- dataElement.attributes.score = String(_root.clock.getTime());
- sendDataElement.appendChild(dataElement);
- sendData.sendAndLoad("processor.php",replyDataServer);
- }
- system.useCodePage = false;
- replyDataServer = new XML();
- replyDataServer.ignoreWhite = true;
- replyDataServer.onLoad = onReplyData;
-